<?php

namespace app\commands;

use app\models\Card;
use app\models\Isp;
use yii\console\Controller;

class TestController extends Controller
{
    /**
     * @throws \yii\base\Exception
     */
    public function actionIndex()
    {
        $isp = Isp::findOne(10);
        $api = new \app\models\sdiot\Api($isp->data);
        $json = $api->cmiotQryCurMonthGprsUsedInfo(1, '1440345568443');
        print_r($json);
    }

    /**
     * @throws \yii\base\Exception
     */
    public function actionIndex10()
    {
//        $isp = Isp::findOne(['id' => 9]);
//        $api = new \app\models\jasper\Api($isp->data);
//        $resp = $api->GetTerminalDetails(['89860618000027739940']);
//        print_r($resp);
//        return;

        $isp = Isp::findOne(['id' => 10]); // 山东移动
        $api = new \app\models\sdiot\Api($isp->data);
        // $json = $api->cmiotQryGPRSInfo('1440193898774');
        $json = $api->cmiotQryOnAndOffRealSingle('1440193898774');
        // $json = $api->smsSendUpSMS(['1440193898523'], date('Y-m-d H:i:s'));
        // $json = $api->bossQryUserInfo('1440193898521');
        // $json = $api->cmiotQryUserStatusRealSingle('1440193898999');
        // json = $api->cmiotQryGPRSRealTimeInfo(1, '1440193898522');
        // $json = $api->smsQueryOpenSMSList();
        // $json = $api->smsQueryOpenSMSList('', 1);
        // $json = $api->smsReadDownSMS();
        print_r($json);
    }
}
